package com.gdou.crrp.repository;

import com.gdou.crrp.entity.Bill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface BillRepository extends JpaRepository<Bill, Integer> {

    //根据用户id查找所有订单
    List<Bill> findAllByUid(Integer uid);

    //根据预约单id删除订单
    @Transactional
    void deleteByBillId(int id);
}
